import React, { PureComponent } from 'react';
import { TabBar, Icon } from 'antd-mobile';
import { nav_bottom_bar, nav_bottom_bar_X, cart_link_s } from './NavBottomBar.less';
import { connect } from 'dva';
import { routerRedux } from 'dva/router';
import all_second_killing from '../../assets/svg/all_second_killing.svg';
import all_second_killing1 from '../../assets/svg/all_second_killing1.svg';
import classification from '../../assets/svg/classification.svg';
import classification1 from '../../assets/svg/classification1.svg';
import remind from '../../assets/svg/remind.svg';
import remind1 from '../../assets/svg/remind1.svg';
//import  loading from 'antd-mobile/lib/svg/loading.svg';

import equi from '../../utils/judgmentEquipment';


class SecKillBottomBar extends PureComponent {


    componentDidMount() {
    }

    render() {
        const { path, dispatch } = this.props;

        return (
            <div style={{zIndex:"11111111"}} className={equi() ? nav_bottom_bar_X : nav_bottom_bar}>
                <TabBar
                    unselectedTintColor="#949494"
                    tintColor="red"
                    barTintColor="white"
                    hidden={false}
                >
                    <TabBar.Item
                        title="全部秒杀"
                        key="Life"
                        icon={<Icon type={all_second_killing1.id}></Icon>}
                        selectedIcon={<Icon type={all_second_killing.id}></Icon>}
                        selected={path === "/secKill"}
                        // badge={1}
                        onPress={() => {
                            dispatch(routerRedux.push({
                                pathname: '/secKill/1',
                            }));
                        }}
                        data-seed="logId"
                    />
                    <TabBar.Item
                        icon={<Icon type={classification1.id}></Icon>}
                        selectedIcon={<Icon type={classification.id}></Icon>}
                        title="秒杀分类"
                        key="Koubei"
                        // badge={'new'}
                        selected={path === '/secKillClass'}
                        onPress={() => {
                            dispatch(routerRedux.push({
                                pathname: '/secKillClass',
                            }));
                        }}
                        data-seed="logId1"
                    />
                    <TabBar.Item
                        icon={<Icon type={remind1.id}></Icon>}
                        selectedIcon={<Icon type={remind.id}></Icon>}
                        title="提醒"
                        key="Friend"
                        // dot
                        selected={path === '/secKillRemind'}
                        onPress={() => {
                            dispatch(routerRedux.push({
                                pathname: '/secKillRemind',
                            }));
                        }}
                    />
                </TabBar>
            </div>

        );
    }
}

export default connect(({ app }) => ({ app }))(SecKillBottomBar);
